<template>
  <div>
    <div>
      <button @click.prevent="changeLanguage">{{ language }}</button>
    </div>
    <router-view></router-view>
  </div>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import layoutStore from '@/store/index'
import { I18NType } from './app.config';

const layoutSe = layoutStore()
const language = computed(() => layoutSe.getLanguage)
const changeLanguage = () => {
  layoutSe.setLanguage(language.value == I18NType.EN_US ? I18NType.ZH_CN : I18NType.EN_US )
}

const test = () => {}
defineExpose({test})
</script>

<style lang="scss" scoped>
</style>
